Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

executor: try to optimize index join query by reduce cop task count #55359

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

crazycs520
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #55357

Problem Summary: try to optimize index join query by reduce cop task count.

Related same PR: #54841

What changed and how does it work?

Increate index join outer executor initial batch size.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.
  1. prepare data:
drop table if exists t0,t1;
create table t1 (id int key auto_increment, b int, index idx1 (b));
insert into t1 () values (), (), (), (), (), (), (), ();
insert into t1 (b) select b from t1;
insert into t1 (b) select b from t1;
insert into t1 (b) select b from t1;
insert into t1 (b) select b from t1;
insert into t1 (b) select b from t1;
insert into t1 (b) select b from t1;
insert into t1 (b) select b from t1;
insert into t1 (b) select b from t1;
insert into t1 (b) select b from t1;
insert into t1 (b) select b from t1;
insert into t1 (b) select b from t1;
insert into t1 (b) select b from t1;
insert into t1 (b) select b from t1;
insert into t1 (b) select b from t1 limit 34464;
insert into t1 (b) select b from t1;
insert into t1 (b) select b from t1;
insert into t1 (b) select b from t1;
insert into t1 (b) select b from t1 limit 200000;
update t1 set b = rand() * 100000;
create table t0 (id int key, b int, index idx1 (b));
insert into t0 select * from t1 order by id limit 100000;
update t0 set b = rand() * 100000;
split table t1 index idx1 between (0) and (100000) regions 10;
analyze table t0,t1;
set @@tidb_store_batch_size=0;

This PR

  • Pay attention to the execution information of IndexReader_11 executor's cop_task number, it is less than before by default.
  • When increasing tidb_max_chunk_size, the IndexReader_11 executor's cop_task number decreases.
  • When increasing tidb_max_chunk_size, the IndexReader_11 executor's actRows decreases, this reduces the stress on the tikv.
-- IndexReader_11's cop_task num is 327
> explain analyze select /*+ INL_JOIN(t0,t1) */ t0.* from t0 join t1 where t0.id<=50000 and t0.b=t1.b;
+-------------------------+-----------+---------+-----------+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+----------+------+
| id                      | estRows   | actRows | task      | access object           | execution info                                                                                                                                                                                                                                         | operator info                                                                                                   | memory   | disk |
+-------------------------+-----------+---------+-----------+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+----------+------+
| IndexJoin_12            | 498516.86 | 501090  | root      |                         | time:169.3ms, loops:491, RU:728.199375, inner:{total:398ms, concurrency:5, task:5, construct:31.6ms, fetch:333ms, build:33.3ms}, probe:30.3ms                                                                                                          | inner join, inner:IndexReader_11, outer key:test.t0.b, inner key:test.t1.b, equal cond:eq(test.t0.b, test.t1.b) | 12.3 MB  | N/A  |
| ├─TableReader_33(Build) | 49740.02  | 50000   | root      |                         | time:28.4ms, loops:51, cop_task: {num: 9, max: 9.16ms, min: 222.9µs, avg: 3.2ms, p95: 9.16ms, tot_proc: 24ms, copr_cache_hit_ratio: 0.00, build_task_duration: 27.9µs, max_distsql_concurrency: 1}, rpc_info:{Cop:{num_rpc:9, total_time:28.8ms}}      | data:Selection_32                                                                                               | 546.5 KB | N/A  |
| │ └─Selection_32        | 49740.02  | 50000   | cop[tikv] |                         | tikv_task:{proc max:9.05ms, min:193.5µs, avg: 3.15ms, p80:7ms, p95:9.05ms, iters:0, tasks:9}, time_detail: {total_process_time: 24ms}                                                                                                                  | not(isnull(test.t0.b))                                                                                          | N/A      | N/A  |
| │   └─TableRangeScan_31 | 49740.02  | 50000   | cop[tikv] | table:t0                | tikv_task:{proc max:9.05ms, min:193.5µs, avg: 3.15ms, p80:7ms, p95:9.05ms, iters:0, tasks:9}                                                                                                                                                           | range:[-inf,50000], keep order:false                                                                            | N/A      | N/A  |
| └─IndexReader_11(Probe) | 498516.86 | 466544  | root      |                         | time:296.4ms, loops:463, cop_task: {num: 327, max: 63ms, min: 47.7µs, avg: 4.99ms, p95: 13.9ms, tot_proc: 1.46s, copr_cache_hit_ratio: 0.00, build_task_duration: 4.13ms, max_distsql_concurrency: 11}, rpc_info:{Cop:{num_rpc:327, total_time:1.63s}} | index:Selection_10                                                                                              | 21.9 KB  | N/A  |
|   └─Selection_10        | 498516.86 | 466544  | cop[tikv] |                         | tikv_task:{proc max:63ms, min:37.5µs, avg: 4.96ms, p80:5.42ms, p95:13.8ms, iters:0, tasks:327}, time_detail: {total_process_time: 1.46s}                                                                                                               | not(isnull(test.t1.b))                                                                                          | N/A      | N/A  |
|     └─IndexRangeScan_9  | 498516.86 | 466544  | cop[tikv] | table:t1, index:idx1(b) | tikv_task:{proc max:63ms, min:37.5µs, avg: 4.96ms, p80:5.42ms, p95:13.8ms, iters:0, tasks:327}                                                                                                                                                         | range: decided by [eq(test.t1.b, test.t0.b)], keep order:false                                                  | N/A      | N/A  |
+-------------------------+-----------+---------+-----------+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+----------+------+
> set @@tidb_max_chunk_size=25000;
-- IndexReader_11's cop_task num is 172
> explain analyze select /*+ INL_JOIN(t0,t1) */ t0.* from t0 join t1 where t0.id<=50000 and t0.b=t1.b;
+-------------------------+-----------+---------+-----------+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+----------+------+
| id                      | estRows   | actRows | task      | access object           | execution info                                                                                                                                                                                                                                           | operator info                                                                                                   | memory   | disk |
+-------------------------+-----------+---------+-----------+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+----------+------+
| IndexJoin_12            | 498516.86 | 501090  | root      |                         | time:196ms, loops:22, RU:501.722620, inner:{total:315.6ms, concurrency:5, task:2, construct:28.5ms, fetch:259.6ms, build:27.5ms}, probe:24.7ms                                                                                                           | inner join, inner:IndexReader_11, outer key:test.t0.b, inner key:test.t1.b, equal cond:eq(test.t0.b, test.t1.b) | 14.4 MB  | N/A  |
| ├─TableReader_33(Build) | 49740.02  | 50000   | root      |                         | time:17.8ms, loops:3, cop_task: {num: 9, max: 5.71ms, min: 336.4µs, avg: 1.93ms, p95: 5.71ms, tot_proc: 13ms, copr_cache_hit_ratio: 0.00, build_task_duration: 27.2µs, max_distsql_concurrency: 1}, rpc_info:{Cop:{num_rpc:9, total_time:17.3ms}}        | data:Selection_32                                                                                               | 546.5 KB | N/A  |
| │ └─Selection_32        | 49740.02  | 50000   | cop[tikv] |                         | tikv_task:{proc max:5.6ms, min:291.8µs, avg: 1.87ms, p80:5.47ms, p95:5.6ms, iters:0, tasks:9}, time_detail: {total_process_time: 13ms}                                                                                                                   | not(isnull(test.t0.b))                                                                                          | N/A      | N/A  |
| │   └─TableRangeScan_31 | 49740.02  | 50000   | cop[tikv] | table:t0                | tikv_task:{proc max:5.6ms, min:291.8µs, avg: 1.87ms, p80:5.47ms, p95:5.6ms, iters:0, tasks:9}                                                                                                                                                            | range:[-inf,50000], keep order:false                                                                            | N/A      | N/A  |
| └─IndexReader_11(Probe) | 498516.86 | 442287  | root      |                         | time:228.9ms, loops:20, cop_task: {num: 172, max: 17.3ms, min: 139.8µs, avg: 6.53ms, p95: 9.98ms, tot_proc: 1.03s, copr_cache_hit_ratio: 0.00, build_task_duration: 1.69ms, max_distsql_concurrency: 11}, rpc_info:{Cop:{num_rpc:172, total_time:1.11s}} | index:Selection_10                                                                                              | 288.1 KB | N/A  |
|   └─Selection_10        | 498516.86 | 442287  | cop[tikv] |                         | tikv_task:{proc max:11.5ms, min:129.6µs, avg: 6.45ms, p80:8.45ms, p95:9.87ms, iters:0, tasks:172}, time_detail: {total_process_time: 1.03s}                                                                                                              | not(isnull(test.t1.b))                                                                                          | N/A      | N/A  |
|     └─IndexRangeScan_9  | 498516.86 | 442287  | cop[tikv] | table:t1, index:idx1(b) | tikv_task:{proc max:11.5ms, min:129.6µs, avg: 6.45ms, p80:8.45ms, p95:9.87ms, iters:0, tasks:172}                                                                                                                                                        | range: decided by [eq(test.t1.b, test.t0.b)], keep order:false                                                  | N/A      | N/A  |
+-------------------------+-----------+---------+-----------+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+----------+------+
> set @@tidb_max_chunk_size=50000;
> set @@tidb_index_join_batch_size=50000;
-- IndexReader_11's cop_task num is 95.
> explain analyze select /*+ INL_JOIN(t0,t1) */ t0.* from t0 join t1 where t0.id<=50000 and t0.b=t1.b;
+-------------------------+-----------+---------+-----------+-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+----------+------+
| id                      | estRows   | actRows | task      | access object           | execution info                                                                                                                                                                                                                                       | operator info                                                                                                   | memory   | disk |
+-------------------------+-----------+---------+-----------+-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+----------+------+
| IndexJoin_12            | 498516.86 | 501090  | root      |                         | time:233ms, loops:12, RU:454.851538, inner:{total:185.9ms, concurrency:5, task:1, construct:27.7ms, fetch:135.6ms, build:22.6ms}, probe:25ms                                                                                                         | inner join, inner:IndexReader_11, outer key:test.t0.b, inner key:test.t1.b, equal cond:eq(test.t0.b, test.t1.b) | 13.4 MB  | N/A  |
| ├─TableReader_33(Build) | 49740.02  | 50000   | root      |                         | time:19.9ms, loops:2, cop_task: {num: 9, max: 5.89ms, min: 206.4µs, avg: 2.14ms, p95: 5.89ms, tot_proc: 14ms, copr_cache_hit_ratio: 0.00, build_task_duration: 24.8µs, max_distsql_concurrency: 1}, rpc_info:{Cop:{num_rpc:9, total_time:19.2ms}}    | data:Selection_32                                                                                               | 546.5 KB | N/A  |
| │ └─Selection_32        | 49740.02  | 50000   | cop[tikv] |                         | tikv_task:{proc max:5.74ms, min:165.1µs, avg: 2.07ms, p80:5.48ms, p95:5.74ms, iters:0, tasks:9}, time_detail: {total_process_time: 14ms}                                                                                                             | not(isnull(test.t0.b))                                                                                          | N/A      | N/A  |
| │   └─TableRangeScan_31 | 49740.02  | 50000   | cop[tikv] | table:t0                | tikv_task:{proc max:5.74ms, min:165.1µs, avg: 2.07ms, p80:5.48ms, p95:5.74ms, iters:0, tasks:9}                                                                                                                                                      | range:[-inf,50000], keep order:false                                                                            | N/A      | N/A  |
| └─IndexReader_11(Probe) | 498516.86 | 393625  | root      |                         | time:117.5ms, loops:9, cop_task: {num: 95, max: 20.8ms, min: 1.73ms, avg: 11.2ms, p95: 17.7ms, tot_proc: 1.01s, copr_cache_hit_ratio: 0.00, build_task_duration: 1.24ms, max_distsql_concurrency: 11}, rpc_info:{Cop:{num_rpc:95, total_time:1.06s}} | index:Selection_10                                                                                              | 333.3 KB | N/A  |
|   └─Selection_10        | 498516.86 | 393625  | cop[tikv] |                         | tikv_task:{proc max:20.8ms, min:1.71ms, avg: 11.1ms, p80:14.6ms, p95:17.7ms, iters:0, tasks:95}, time_detail: {total_process_time: 1.01s}                                                                                                            | not(isnull(test.t1.b))                                                                                          | N/A      | N/A  |
|     └─IndexRangeScan_9  | 498516.86 | 393625  | cop[tikv] | table:t1, index:idx1(b) | tikv_task:{proc max:20.8ms, min:1.71ms, avg: 11.1ms, p80:14.6ms, p95:17.7ms, iters:0, tasks:95}                                                                                                                                                      | range: decided by [eq(test.t1.b, test.t0.b)], keep order:false                                                  | N/A      | N/A  |
+-------------------------+-----------+---------+-----------+-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+----------+------+


> set @@tidb_enable_paging=0;
> set @@tidb_max_chunk_size=50000;
> set @@tidb_index_join_batch_size=50000;
-- IndexReader_11's cop_task num is 11.
> explain analyze select /*+ INL_JOIN(t0,t1) */ t0.* from t0 join t1 where t0.id<=50000 and t0.b=t1.b;
+-------------------------+-----------+---------+-----------+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+----------+------+
| id                      | estRows   | actRows | task      | access object           | execution info                                                                                                                                                                                                                                        | operator info                                                                                                   | memory   | disk |
+-------------------------+-----------+---------+-----------+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+----------+------+
| IndexJoin_12            | 498516.86 | 501090  | root      |                         | time:134.3ms, loops:12, RU:118.448647, inner:{total:86.4ms, concurrency:5, task:1, construct:28.1ms, fetch:36.3ms, build:22ms}, probe:29.7ms                                                                                                          | inner join, inner:IndexReader_11, outer key:test.t0.b, inner key:test.t1.b, equal cond:eq(test.t0.b, test.t1.b) | 13.4 MB  | N/A  |
| ├─TableReader_33(Build) | 49740.02  | 50000   | root      |                         | time:15.7ms, loops:2, cop_task: {num: 1, max: 15.5ms, proc_keys: 0, tot_proc: 15ms, copr_cache_hit_ratio: 0.00, build_task_duration: 21.4µs, max_distsql_concurrency: 1}, rpc_info:{Cop:{num_rpc:1, total_time:15.4ms}}                               | data:Selection_32                                                                                               | 815.0 KB | N/A  |
| │ └─Selection_32        | 49740.02  | 50000   | cop[tikv] |                         | tikv_task:{time:15.2ms, loops:0}, time_detail: {total_process_time: 15ms}                                                                                                                                                                             | not(isnull(test.t0.b))                                                                                          | N/A      | N/A  |
| │   └─TableRangeScan_31 | 49740.02  | 50000   | cop[tikv] | table:t0                | tikv_task:{time:15.2ms, loops:0}                                                                                                                                                                                                                      | range:[-inf,50000], keep order:false                                                                            | N/A      | N/A  |
| └─IndexReader_11(Probe) | 498516.86 | 393625  | root      |                         | time:16.8ms, loops:9, cop_task: {num: 11, max: 16.6ms, min: 3.34ms, avg: 12.6ms, p95: 16.6ms, tot_proc: 133ms, copr_cache_hit_ratio: 0.00, build_task_duration: 1.21ms, max_distsql_concurrency: 11}, rpc_info:{Cop:{num_rpc:11, total_time:138.8ms}} | index:Selection_10                                                                                              | 976.3 KB | N/A  |
|   └─Selection_10        | 498516.86 | 393625  | cop[tikv] |                         | tikv_task:{proc max:16.5ms, min:3.28ms, avg: 12.6ms, p80:14ms, p95:16.5ms, iters:0, tasks:11}, time_detail: {total_process_time: 133ms}                                                                                                               | not(isnull(test.t1.b))                                                                                          | N/A      | N/A  |
|     └─IndexRangeScan_9  | 498516.86 | 393625  | cop[tikv] | table:t1, index:idx1(b) | tikv_task:{proc max:16.5ms, min:3.28ms, avg: 12.6ms, p80:14ms, p95:16.5ms, iters:0, tasks:11}                                                                                                                                                         | range: decided by [eq(test.t1.b, test.t0.b)], keep order:false                                                  | N/A      | N/A  |
+-------------------------+-----------+---------+-----------+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+----------+------+

Before

-- IndexReader_11's cop_task num is 425
>  explain analyze select /*+ INL_JOIN(t0,t1) */ t0.* from t0 join t1 where t0.id<=50000 and t0.b=t1.b;
+-------------------------+-----------+---------+-----------+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+----------+------+
| id                      | estRows   | actRows | task      | access object           | execution info                                                                                                                                                                                                                                                                                                     | operator info                                                                                                   | memory   | disk |
+-------------------------+-----------+---------+-----------+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+----------+------+
| IndexJoin_12            | 498516.86 | 501090  | root      |                         | time:163.3ms, loops:491, RU:624.032959, inner:{total:445.2ms, concurrency:5, task:10, construct:26ms, fetch:384.3ms, build:34.9ms}, probe:28.2ms                                                                                                                                                                   | inner join, inner:IndexReader_11, outer key:test.t0.b, inner key:test.t1.b, equal cond:eq(test.t0.b, test.t1.b) | 10.8 MB  | N/A  |
| ├─TableReader_33(Build) | 49740.02  | 50000   | root      |                         | time:29.1ms, loops:54, cop_task: {num: 9, max: 5.27ms, min: 146.5µs, avg: 2.16ms, p95: 5.27ms, tot_proc: 11ms, copr_cache_hit_ratio: 0.00, build_task_duration: 4.21µs, max_distsql_concurrency: 1}, rpc_info:{Cop:{num_rpc:9, total_time:19.3ms}}                                                                 | data:Selection_32                                                                                               | 546.5 KB | N/A  |
| │ └─Selection_32        | 49740.02  | 50000   | cop[tikv] |                         | tikv_task:{proc max:4.68ms, min:135.5µs, avg: 1.57ms, p80:4.54ms, p95:4.68ms, iters:0, tasks:9}, time_detail: {total_process_time: 11ms}                                                                                                                                                                           | not(isnull(test.t0.b))                                                                                          | N/A      | N/A  |
| │   └─TableRangeScan_31 | 49740.02  | 50000   | cop[tikv] | table:t0                | tikv_task:{proc max:4.68ms, min:135.5µs, avg: 1.57ms, p80:4.54ms, p95:4.68ms, iters:0, tasks:9}                                                                                                                                                                                                                    | range:[-inf,50000], keep order:false                                                                            | N/A      | N/A  |
| └─IndexReader_11(Probe) | 498516.86 | 469930  | root      |                         | time:346.7ms, loops:474, cop_task: {num: 425, max: 14.8ms, min: 23.2µs, avg: 2.95ms, p95: 6.86ms, tot_proc: 1.02s, copr_cache_hit_ratio: 0.00, build_task_duration: 2.47ms, max_distsql_concurrency: 11}, rpc_info:{Cop:{num_rpc:426, total_time:1.25s}, rpc_errors:{epoch_not_match:1}}, backoff{regionMiss: 4ms} | index:Selection_10                                                                                              | 2.55 KB  | N/A  |
|   └─Selection_10        | 498516.86 | 469930  | cop[tikv] |                         | tikv_task:{proc max:14.8ms, min:16µs, avg: 2.86ms, p80:4.92ms, p95:6.67ms, iters:0, tasks:425}, time_detail: {total_process_time: 1.02s}                                                                                                                                                                           | not(isnull(test.t1.b))                                                                                          | N/A      | N/A  |
|     └─IndexRangeScan_9  | 498516.86 | 469930  | cop[tikv] | table:t1, index:idx1(b) | tikv_task:{proc max:14.8ms, min:16µs, avg: 2.86ms, p80:4.92ms, p95:6.67ms, iters:0, tasks:425}                                                                                                                                                                                                                     | range: decided by [eq(test.t1.b, test.t0.b)], keep order:false                                                  | N/A      | N/A  |
+-------------------------+-----------+---------+-----------+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+----------+------+

> set @@tidb_max_chunk_size=25000;
-- IndexReader_11's cop_task num is 425
>  explain analyze select /*+ INL_JOIN(t0,t1) */ t0.* from t0 join t1 where t0.id<=50000 and t0.b=t1.b;
+-------------------------+-----------+---------+-----------+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+----------+------+
| id                      | estRows   | actRows | task      | access object           | execution info                                                                                                                                                                                                                                          | operator info                                                                                                   | memory   | disk |
+-------------------------+-----------+---------+-----------+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+----------+------+
| IndexJoin_12            | 498516.86 | 501090  | root      |                         | time:141.7ms, loops:22, RU:534.556616, inner:{total:355.9ms, concurrency:5, task:10, construct:32.2ms, fetch:287.5ms, build:36.1ms}, probe:26ms                                                                                                         | inner join, inner:IndexReader_11, outer key:test.t0.b, inner key:test.t1.b, equal cond:eq(test.t0.b, test.t1.b) | 10.5 MB  | N/A  |
| ├─TableReader_33(Build) | 49740.02  | 50000   | root      |                         | time:19ms, loops:12, cop_task: {num: 9, max: 6.24ms, min: 305.7µs, avg: 2.18ms, p95: 6.24ms, tot_proc: 17ms, copr_cache_hit_ratio: 0.00, build_task_duration: 25.8µs, max_distsql_concurrency: 1}, rpc_info:{Cop:{num_rpc:9, total_time:19.5ms}}        | data:Selection_32                                                                                               | 546.5 KB | N/A  |
| │ └─Selection_32        | 49740.02  | 50000   | cop[tikv] |                         | tikv_task:{proc max:6.19ms, min:249µs, avg: 2.13ms, p80:5.17ms, p95:6.19ms, iters:0, tasks:9}, time_detail: {total_process_time: 17ms}                                                                                                                  | not(isnull(test.t0.b))                                                                                          | N/A      | N/A  |
| │   └─TableRangeScan_31 | 49740.02  | 50000   | cop[tikv] | table:t0                | tikv_task:{proc max:6.19ms, min:249µs, avg: 2.13ms, p80:5.17ms, p95:6.19ms, iters:0, tasks:9}                                                                                                                                                           | range:[-inf,50000], keep order:false                                                                            | N/A      | N/A  |
| └─IndexReader_11(Probe) | 498516.86 | 469930  | root      |                         | time:245.7ms, loops:36, cop_task: {num: 425, max: 9.58ms, min: 37µs, avg: 2.21ms, p95: 5.43ms, tot_proc: 748ms, copr_cache_hit_ratio: 0.00, build_task_duration: 2.09ms, max_distsql_concurrency: 11}, rpc_info:{Cop:{num_rpc:425, total_time:934.6ms}} | index:Selection_10                                                                                              | 1.66 KB  | N/A  |
|   └─Selection_10        | 498516.86 | 469930  | cop[tikv] |                         | tikv_task:{proc max:9.56ms, min:27.4µs, avg: 2.19ms, p80:4.05ms, p95:5.4ms, iters:0, tasks:425}, time_detail: {total_process_time: 748ms}                                                                                                               | not(isnull(test.t1.b))                                                                                          | N/A      | N/A  |
|     └─IndexRangeScan_9  | 498516.86 | 469930  | cop[tikv] | table:t1, index:idx1(b) | tikv_task:{proc max:9.56ms, min:27.4µs, avg: 2.19ms, p80:4.05ms, p95:5.4ms, iters:0, tasks:425}                                                                                                                                                         | range: decided by [eq(test.t1.b, test.t0.b)], keep order:false                                                  | N/A      | N/A  |
+-------------------------+-----------+---------+-----------+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+----------+------+

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 12, 2024
Copy link

tiprow bot commented Aug 12, 2024

Hi @crazycs520. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link
Contributor

@cfzjywxk cfzjywxk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 12, 2024
Copy link

ti-chi-bot bot commented Aug 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cfzjywxk, XuHuaiyu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 12, 2024
Copy link

ti-chi-bot bot commented Aug 12, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-08-12 06:56:10.120766295 +0000 UTC m=+164654.824235938: ☑️ agreed by cfzjywxk.
  • 2024-08-12 07:08:58.874206548 +0000 UTC m=+165423.577676192: ☑️ agreed by XuHuaiyu.

Copy link

codecov bot commented Aug 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.5502%. Comparing base (2abd334) to head (d9f0cdf).
Report is 3 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #55359        +/-   ##
================================================
- Coverage   74.8217%   74.5502%   -0.2716%     
================================================
  Files          1572       1572                
  Lines        365097     440782     +75685     
================================================
+ Hits         273172     328604     +55432     
- Misses        72157      91924     +19767     
- Partials      19768      20254       +486     
Flag Coverage Δ
integration 47.8285% <100.0000%> (?)
unit 71.8040% <100.0000%> (-1.9316%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.9567% <ø> (-2.2327%) ⬇️
parser ∅ <ø> (∅)
br 52.4553% <ø> (+4.8011%) ⬆️

@ti-chi-bot ti-chi-bot bot merged commit e767f86 into pingcap:master Aug 12, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

try to optimize index join query by reduce cop task count
3 participants